import 'package:car_map/mode/navigation_model.dart';
import 'package:car_map/widget/widget_navigation_item.dart';
import 'package:flutter/material.dart';

///洗车服务
class CarWashPage extends StatefulWidget{
  @override
  _varWashState createState() =>_varWashState();

}

class _varWashState extends State<CarWashPage>{
  List<NavigationModel> list;

  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    navigationList();
  }

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: AppBar(
        title: Text('洗车服务'),
      ),
      body: Container(
        child: ListView.builder(itemBuilder: (context,index){
          return WidgetNavigationItem.widgetNavigationItem(list[index]);
        },itemCount: list.length,),
      ),
    );
  }

  //制造假数据
  List<NavigationModel> navigationList(){
    list=new List();
    list.add(new NavigationModel(title: '兄弟洗车行',
        address: '陕西省西安市雁塔区漳浒寨街道双旗寨村东南方向',
        latitude:34.2252870802,longitude:108.8221549988,
        iconData: Icons.local_car_wash));
    list.add(new NavigationModel(title: '姐妹洗车行',
        address: '陕西省西安市雁塔区鱼化寨街道贺家寨村西北方向',
        latitude:34.2269193191,longitude:108.8430118561,
        iconData: Icons.local_car_wash));
    list.add(new NavigationModel(title: '父子洗车行',
        address: '陕西省西安市雁塔区丈八沟街道丁家桥北方向',
        latitude:34.2284805614,longitude:108.8690185547,
        iconData: Icons.local_car_wash));
  }

}